<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改护理信息</title>
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/js/common/bootstrap/css/bootstrap.min.css">

<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/js/common/bootstrap/css/bootstrap-theme.min.css">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="${pageContext.request.contextPath }/js/jquery-3.1.1.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script
	src="${pageContext.request.contextPath }/js/common/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<form action="http://127.0.0.1:8081/bsc/jhy/updateBis_nurse_project"
		id="fo" name="fo" method="post" class="form-inline" enctype="multipart/form-data">
		<table border="0" cellspacing="0" cellpadding="10" width="80%"
			class="table ">
			<h2 align="center">修改护理信息</h2>
			<input type="hidden" name="project_id" id="project_id" value="${bnp.project_id }">
			<tr>
				<td width="15%" align="right">项目名称:</td>
				<td width="35%"><input type="text" id="project_name"
					name="project_name" value="${bnp.project_name }" class="form-control"/></td>
				<td width="15%" align="right">状态:</td>
				<td width="35%">
				<input id="statusval" type="hidden" class="span2"  value="${bnp.status}" >
				<select name="status" id="status"
					class="form-control">
						<option value="1">在售</option>
						<option value="2">下架</option>
				</select></td>
			</tr>
			<tr>
				<td align="right">列表图片:</td>
				<td><input type="file" class="form-control" 
					 name="file1" value="http://localhost:8081/bsc/js/${bnp.cover_big_photo}">
					 <div style="width:100px; height:100px; border-radius:50%; overflow:hidden;">
				<img width="100px" height="100px" src="http://localhost:8081/bsc/js/${bnp.cover_big_photo}" >
				</div></td>
				<td align="right">封面图片:</td>
				<td><input type="file" class="form-control"
					 name="file2" value="http://localhost:8081/bsc/js/${bnp.cover_photo}">
					 <div style="width:100px; height:100px; border-radius:50%; overflow:hidden;">
				<img width="100px" height="100px" src="http://localhost:8081/bsc/js/${bnp.cover_photo }"></td>
				</div></td>
			</tr>
			<tr>
				<td align="right">分类:</td>
				<td><select name="type_id" id="type_id" class="form-control">
						<option value="">全部</option>
						<c:forEach items="${tlist }" var="type">
							<option value="${type.type_id }" ${type.type_id==bnp.type_id?"selected":"" }>${type.type_name }</option>
						</c:forEach>

				</select></td>
				<td align="right">所用设备</td>
				<td><input type="text" id="use_device" name="use_device"
					value="${bnp.use_device }" class="form-control" /></td>
			</tr>
			<tr>
				<td align="right">服务时长:</td>
				<td><input type="text" id="server_time" name="server_time"
					class="form-control" value="${bnp.server_time }">分钟</td>
				<td align="right">人命币售价:</td>
				<td><input type="text" id="rmb_price" name="rmb_price"
					class="form-control" value="${bnp.rmb_price }">元</td>
			</tr>
			<tr>
				<td align="right">颜值售价:</td>
				<td><input type="text" id="beauty_price" name="beauty_price"
					class="form-control" value="${bnp.beauty_price }">个</td>
				<td align="right">标准手工费:</td>
				<td><input type="text" id="manual_price" name="manual_price"
					class="form-control" value="${bnp.manual_price }">元</td>
			</tr>
			<tr>
				<td align="right">活动手工费:</td>
				<td><input type="text" id="active_price" name="active_price"
					class="form-control" value="${bnp.active_price }">元</td>
				<td align="right">排序号:</td>
				<td><input type="text" id="sort_no" name="sort_no"
					class="form-control" value="${bnp.sort_no }"></td>
			</tr>
			<tr>
				<td align="right">内容描述</td>
				<td colspan="3"><textarea class="form-control" rows="10"
						cols="100" name="content" id="content">${bnp.content }</textarea>
						
					<button class="btn btn-default" type="submit">
						<span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span> 保存
					</button></td>
			</tr>

		</table>
	</form>
</body>
</html>
<script type="text/javascript">
$(document).ready(function(){ 
    var Flag=$("#statusval").val();
    //alert(Flag);
    //根据值让option选中 
    if(Flag=="1"){
        $("#status option[value='"+Flag+"']").attr("selected","selected");
    }else if(Flag=="2"){
        $("#status option[value='"+Flag+"']").attr("selected","selected");
    }
}); 
</script>